package com.huike.clues.service.impl;

import com.huike.clues.mapper.GetTodayInfomapper;
import com.huike.common.core.domain.entity.SysUser;
import com.huike.common.core.domain.model.LoginUser;
import com.huike.common.utils.ServletUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.token.TokenService;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;
import javax.xml.crypto.Data;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Service
public class GetTodayInfoservice {
    @Autowired
    private GetTodayInfomapper getTodayInfomapper;

    public Map<String,String> get(SysUser user){
        HashMap<String, String> map = new HashMap<>();
        Date date = new Date();
        String name = user.getUserName();
        String s1 = getTodayInfomapper.gettodayCluesNum(name ,date);
        String s2 = getTodayInfomapper.todayBusinessNum(name ,date);
        String s3 = getTodayInfomapper.todayContractNum(name ,date);
        String s4= getTodayInfomapper.todaySalesAmount(name ,date);
        map.put("todayCluesNum",s1);
        map.put("todayBusinessNum",s2);
        map.put("todayContractNum",s3);
        map.put("todaySalesAmount",s4);
        return map;
    }


}
